package com.taoym.voucher.admin.controller;

import com.taoym.voucher.admin.entity.dto.XcxGetUserInfosDTO;
import com.taoym.voucher.admin.entity.vo.XcxGetUserInfosVO;
import com.taoym.voucher.admin.service.XcxUserInfoService;
import com.taoym.voucher.common.response.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @coder taoym
 * @datetime 2021/7/1 10:06
 * @desc 用户信息控制器
 */
@Api(tags = "用户信息控制器")
@RestController
@RequestMapping("/xcx/user")
@Validated
public class XcxUserInfoController {

    @Autowired
    private XcxUserInfoService xcxUserInfoService;

    @ApiOperation("查询用户信息列表")
    @GetMapping("/list")
    public Response<XcxGetUserInfosVO> listUser(@Valid XcxGetUserInfosDTO data) {
        return Response.success(xcxUserInfoService.listUserInfo(data));
    }
}
